package com.gdcp.service;

import com.gdcp.beans.Category;
import com.gdcp.beans.Product;
import com.gdcp.common.page.PageBean;
import com.gdcp.util.ImageDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ProductService {

    List<Product> queryByCreateTime();

    List<Product> queryByLimit(Integer parent_id, int startRow, int pageSize);

    PageBean<Product> findByKeyWord(Integer cid, int pc, String keyword, String sort, Integer min, Integer max);

    Product productInfoById(Integer id);

    List<Product> queryProductsByCid(Integer category_id);

    List<Product> queryShopProductByShopId(Integer shop_id);

    Product queryProductByShopId(Integer valueOf);

    Map<String,Object> findPageBreakByCondition(Map<String, Object> param, Integer shop_id);

    Map<String,Object> removeByPrimaryKey(Integer[] ids);

    Map<String,Object> insert(Product product, ImageDto mainImage, ImageDto imageLeft, ImageDto imageCenter, ImageDto imageRight);

    Map<String,Object> updateInformation(Product product, ImageDto mainImage, ImageDto imageLeft, ImageDto imageCenter, ImageDto imageRight);

    Product getInformation(Integer id);

    Map<String, Object> searchInformation(Map<String, Object> param);

    List<Product> queryAllByShopId(@Param(value = "shop_id") Integer shopId);

    PageBean<Product> searchByKeyWord(Integer cid, int pc, String search_key, String column, String sort, Integer min, Integer max);

    int updateSaleCount(Integer product_id);

    int updatePopularity(Integer product_id);

    List<Product> queryByPopularity();

    List<Product> queryBySale_count();

    List<Product> queryByParentId(Integer id);

    Map<String, Object> findAll(Map<String, Object> model);

    Map<String, Object> searchInformationByShopId(Map<String, Object> model, Integer shop_id);

    void updateInformationByOrderId(Product product);
}
